home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MacWorld 1999 January - Disc 2
/
Macworld (1999-01) (Disk 2).dmg
/
Serious Demos
/
Symbolic Composer 4.2
/
Environment
/
Projects
/
Examples
/
First Tutorial
/
Invention No 4
< prev
next >
Wrap
Lisp/Scheme
|
1998-10-26
|
2KB
|
103 lines
; Invention No 4
(create-tonality clusters '(c 3 c# 3 f 3 f# 3 g 3 b 3))
(create-tonality spaces '(c 3 c# 3 d# 3 f# 3 b 3 f 4 c 4 g# 4 e 5))
(setq chord1 (activate-tonality (clusters c 5)))
(setq chord2 (activate-tonality (clusters c# 5)))
(setq chord3 (activate-tonality (clusters f# 3)))
(setq tonal (activate-tonality (spaces c 3)))
(setq tonal1 (activate-tonality (spaces c 5 )))
(setq row '(a d c f =))
(defsym a '(ab cd df))
(defsym b (append row '(bc def)))
(defsym f '(b a f = cdf))
(setq rhy1 '(1/32))
(setq rhy2 (vector-to-list (vector-round 12 384
(gen-sin 2 0.7 32 120))))
(setq rhy3 (gen-loop '(1 4 3 2)'(24 36 48 60)))
(setq rhy4 '(-1/4 1/8 1/8 1/8-5 1/8-5 1/8-5 1/8-5 1/8-5))
(setq mel1 (gen-trans a 2))
(setq mel2 (gen-notrans b 2))
(setq mel3 (gen-notrans f 2))
(setq mel4 (fill-template rhy2 (symbol-repeat 2 row)))
(setq vel1 '(112 96 84 72))
(setq vel2 (vector-to-list (vector-round 30 120
(gen-sin 2 0.7 32 120))))
(setq vel3 (reverse (change-length times 2 rhy3)))
(setq vel4 '(0 20 40 60 65 70 75 80))
(def-symbol
p1 mel1
p2 mel2
p3 mel3
p4 mel4
p5 mel3
)
(def-length
p1 rhy4
p2 rhy2
p3 rhy3
p4 rhy1
p5 (append rhy4 rhy3 rhy2)
)
(def-velocity
p1 vel4
p2 vel2
p3 vel3
p4 vel1
p5 (append vel4 vel3 vel2)
)
(def-channel
p1 1
p2 2
p3 3
p4 4
p5 5
)
(def-zone
tempo (symbol-repeat (length "- - --- -- --- -") '(1/2))
)
(def-tempo '(124 120 116 118 120 122 130 60 40 50 60 70 80 80 90 100))
(def-program gm-sound-set
p1 ((61))
p2 ((12))
p3 ((67))
p4 ((1))
p5 ((14))
)
(def-expression
p1 ((legato 140 20 0.4) (humanize 0 2 0.4) (velocity 20 0.4))
p2 ((legato 140 20 0.4) (humanize 0 2 0.4) (velocity 20 0.4))
p3 ((legato 140 20 0.4) (humanize 0 2 0.4) (velocity 20 0.4))
p4 ((legato 140 20 0.4) (humanize 0 2 0.4) (velocity 20 0.4))
p5 ((legato 140 20 0.4) (humanize 0 2 0.4) (velocity 20 0.4))
)
(midiport :printer)
(compile-song-p "ccl;output:" 1/2 "study2"
; BARS |--|----|---|-|--|---|----|-|
p1 tonal1 "- - --- -- --- -"
p2 chord1 " - -- ----- "
p3 chord2 " - -- - -- "
p4 chord3 "--- - -- "
p5 tonal " --- --- - - ---- -"
)